package tech.aistar.entity;

import java.io.Serializable;


public class User implements Serializable{


    //对象的标识
    private Integer id;

    //用户名
    private String username;

    //密码
    private String password;

    //对象的角色
    private int power;//0-超级管理员  1-普通人员

    private Integer phone;

    //密保问题
    private String question;

    //密保答案
    private String answer;



    public User() {
    }

    //带参构造
    public User(String username, String password, int power,int phone, String question, String answer) {
        this.username = username;
        this.password = password;
        this.power = power;
        this.phone = phone;
        this.question = question;
        this.answer = answer;
    }

    //getter/setter


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getphone() {
        return phone;
    }

    public void setphone(int phone) {
        this.phone = phone;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }
    public String getanswer() {
        return answer;
    }

    public void setanswer(String answer) {
        this.answer = answer;
    }

    //toString

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("User{");
        sb.append("id=").append(id);
        sb.append(", username='").append(username).append('\'');
        sb.append(", password='").append(password).append('\'');
        sb.append(", power=").append(power);
        sb.append(", phone=").append(phone);
        sb.append(", question='").append(question).append('\'');
        sb.append(", answer='").append(answer).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
